﻿using UnityEngine;
using System.Collections;

public class PlayerIndicator : MonoBehaviour
{
	public SpriteRenderer sprite;
	private Transform trans = null;
	private Transform target = null;

	private void Awake()
	{
		trans = transform;
	}

	public void SetTarget(Transform _target, Color _color)
	{
		target = _target;
		sprite.color = _color;
		trans.position = target.position;
	}

	private void LateUpdate()
	{
		if (target != null)
		{
			trans.position = target.position;
		}
	}
}
